package com.tmt.im.manager.controller.vo;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/9/5 20:16
 * @Version 1.0
 **/
@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Tag(name = "PageQueryRequest", description = "分页查询请求对象")
public class PageQueryRequest implements Serializable {

    @Serial
    private static final long serialVersionUID = 4717590377314994348L;

    @Schema(description = "要查询返回的页序号")
    @NotNull(message = "页序号不能为null")
    @Min(value = 0, message = "页序号不能小于0")
    @JsonProperty("pageNo")
    private Integer pageIndex;

    @Schema(description = "每页的数据记录数量")
    @Min(value = 1, message = "每页的数据记录数量不能小于1")
    private Integer pageSize;
}